#How do I display a picture on the screen?

import random
import pygame
from pygame.locals import *

import qgl
import qgle
    
def random_position():
    return random.randint(0,800)-400, random.randint(0,600)-300, 0

def main():
    #setup pygame as normal, making sure to include the OPENGL flag in the init function arguments.
    pygame.init()
    screen = pygame.display.set_mode((800,600))
    
    

    alien = pygame.image.load("fashion_boy/data/alien.gif")
    background = pygame.Surface((800,600)).convert()
    background.fill((0,0,0))
    clock = pygame.time.Clock()
    while True:
        clock.tick(200)
        #process pygame events.
        for event in pygame.event.get():
            if event.type is QUIT:
                return
            elif event.type is KEYDOWN:
                print "FPS:", clock.get_fps()
                return
        
        screen.blit(background, (0,0))
        for i in range(100):
            x,y,z = random_position()
            screen.blit(alien, (x+400,y+300))
        
        
        #flip the display
        pygame.display.flip()


main()

